<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich" xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html" xml:lang="en" lang="en">

<body>
<ui:composition
        template="/common/template.xhtml">
    <ui:define name="title">Мэппинг</ui:define>
    <ui:define name="body">
        Мэппинг для данных из файла: <h:outputText value="#{mappingBean.processedFile}" style="color:chocolate;"/>
        <rich:dataTable id="mappingTable" value="#{mappingBean.properties}" var="dataProperty">
            <rich:column>
                <f:facet name="header">
                    <h:outputText value="Элемент"/>
                </f:facet>
                <h:outputText value="#{dataProperty.name}"/>
            </rich:column>
            <rich:column>
                <f:facet name="header">
                    <h:outputText value="CRM классы"/>
                </f:facet>
                <rich:dataList value="#{mappingBean.crmClasses}" var="crmClass">
                    <h:outputText value="#{crmClass.name}"/>
                </rich:dataList>
            </rich:column>
        </rich:dataTable>
        <h:form>
            <h:commandLink value="Извлечь утверждения >>" action="#{mappingBean.retrieveStatemens}"/>
        </h:form>
    </ui:define>
</ui:composition>
</body>
</html>